From: Florian Müllner Date: Sat, 20 Feb 2010 21:08:54 +0000 (+0100) Subject: [Notification] Replace all newlines in body with spaces X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~10425 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ec725cc6d4d56868ad973580d60cfe501080826f;p=gnome-shell.git [Notification] Replace all newlines in body with spaces Accidentally we only replaced the first newline of the body text with spaces - replace all occurrences instead. https://bugzilla.gnome.org/show_bug.cgi?id=610549 --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 06dd250bb..188a55fb2 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -116,7 +116,7 @@ Notification.prototype = { y_fill: false }); this._titleLabel = new St.Label(); - title = title ? _cleanMarkup(title.replace('\n', ' ')) : ''; + title = title ? _cleanMarkup(title.replace(/\n/g, ' ')) : ''; this._titleLabel.clutter_text.set_markup('' + title + ''); this._bannerBox.add_actor(this._titleLabel); @@ -126,7 +126,7 @@ Notification.prototype = { this._bannerBodyText = null; this._bannerLabel = new St.Label(); - banner = banner ? _cleanMarkup(banner.replace('\n', ' ')) : ''; + banner = banner ? _cleanMarkup(banner.replace(/\n/g, ' ')) : ''; this._bannerLabel.clutter_text.set_markup(banner); this._bannerBox.add_actor(this._bannerLabel); },